<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="zh">
<head>
<link rel="stylesheet" href='../css/nav.css' />
<link rel="stylesheet" href='../css/main.css' />
	<jsp:include page="/commonPages/admin-meta.jsp" flush="true" />
	<!-- CSS files -->
	<jsp:include page="/commonPages/admin-style.jsp" flush="true" />
	<style type="text/css">
	
	.main1{
	    width:100px;
	    height:100px;
	    border-radius:50%;
	    -moz-border-radius:50%;
	    -webkit-border-radius:50%;
	    position:absolute;
	}
	#left{
		top:-50px;
		left:-50px;
	}
	ul{
	list-style: none;
	}


</style>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>

    
    <script>
	
	
	
</script>


</head>
<body >
	<div id="wrapper">

		<!-- Navigation -->
		<jsp:include page="/commonPages/admin-navigator.jsp" flush="true" />
		
	
        <div id="page-wrapper">
        
	
        
        
        
        <div id="main">
        
      <div class="sort_switch">
          <ul id="TabsNav">
          	  <li class="" id="candidate"><a href="./process/listTask?taskType=candidate">待领取</a></li>
          	  <li class="" id="assignee"><a href="./process/listTask?taskType=assignee">待办</a></li>
          	   <li class="" id="assignee"><a href="./process/listTask?taskType=history">历史</a></li>
          </ul>
      </div>
      
      <div class="sort_content">
           <table class="tableHue" width="100%" border="1" bordercolor="#a4d5e3" cellspacing="0" cellpadding="0">
             
                 <c:if test="${taskType == 'candidate' || taskType =='assignee'}">
              	 	 <thead>
                <tr>
                  <td width="15%"><strong>项目名称</strong></td>
                  <td width="15%"><strong>申请类型</strong></td>
                  <td width="15%"><strong>申请时间</strong></td>
                  <td width="10%"><strong>申请人</strong></td>
                  <td width = "15%"><strong>操作</strong></td>
                  
                </tr>
                </c:if>
              </thead>
              
              
              <c:if test="${taskType == 'history'}">
              	 	 <thead>
                <tr>
                  <td width="15%"><strong>项目类型</strong></td>
                  <td width="15%"><strong>项目名称</strong></td>
                  <td width="15%"><strong>任务名称</strong></td>
                  <td width="10%"><strong>开始时间</strong></td>
                  <td width = "15%"><strong>结束时间</strong></td>
                  
                </tr>
                </c:if>
              </thead>
              
              
              
              <c:if test="${taskType == 'candidate' || taskType =='assignee'}">
              <tbody id="">
              	<c:forEach items="${tasks}" var="task">
                <tr>
                  <td>${task.proName}</td>
                  <td>${task.type}
                  <td>${task.time}</td>
                  <td>${task.userName}</td>
                  <td> 
                
                  <c:if test="${taskType == 'assignee'}">
                  	<a href="./process/perform?taskId=${task.taskId}&processInstanceId=${task.proInstId}&type=${task.number}">办理</a>
                  </c:if>
                 
                   <c:if test="${taskType == 'candidate'}">
                  	<a href="./process/claim?taskId=${task.taskId}">领取</a>
              	 	</c:if>
                  	<a href="diagram.jsp?processInstanceId=${task.proInstId }">查看</a>
                  </td>
                </tr>
                </c:forEach>
              </tbody>
              </c:if>
              
              <c:if test="${taskType == 'history' }">
              <tbody id="">
              	<c:forEach items="${historyTask}" var="task">
                <tr>
                  <td>${task.type}</td>
                  <td>${task.proName}
                  <td>${task.taskName}</td>
                  <td>${task.startTime}</td>
                  <td>${task.endTime}</td>
                 
                </tr>
                </c:forEach>
              </tbody>
              </c:if>
              
          </table>
      </div>

      
	</div>
           
        
        
        
        
        
           
            
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->
	
	<!-- JS files -->
    <jsp:include page="/commonPages/admin-script.jsp" flush="true" />
</body>
</html>
